import 'babel-polyfill'
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import { http, url } from './libs/http'

import exifjs from 'exif-js'

Vue.prototype.$http = http
Vue.prototype.$url = url
Vue.prototype.$exif = exifjs;

// import voice from 'vue-voice'
// Vue.use(voice)

import { Button, Upload, Icon, message, Checkbox, Input, Radio, Popover, Modal, Tooltip, Dropdown, Menu, Progress } from 'vue-voice'

Vue.use(Button)
Vue.use(Upload)
Vue.use(Icon)
Vue.use(Checkbox)
Vue.use(Input)
Vue.use(Radio)
Vue.use(Popover)
Vue.use(Modal)
Vue.use(Tooltip)
Vue.use(Dropdown)
Vue.use(Menu)
Vue.use(Progress)
Vue.prototype.$message = message
Vue.prototype.$confirm = Modal.confirm

message.config({
  top: `60px`,
  duration: 2,
  maxCount: 10,
});

import 'vue-voice/es/style.js';
import './theme.less';

Vue.config.productionTip = false;

// 阻止浏览器默认鼠标右键
document.oncontextmenu = () => false;

new Vue({
  router,
  store,
  data: {
    $bus: new Vue(),
  },
  render: (h) => h(App),
}).$mount('#app')
